﻿<UserControl
    x:Class="RS.UI.ViewPort3D"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ogl="clr-namespace:RS.Helper.WPF.OGL"
    Focusable="True"
    FocusVisualStyle="{x:Null}"
    Background="#ff111111">
    <Border x:Name="bdrFocus" BorderBrush="Transparent" BorderThickness="2" Focusable="False">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="32"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <Menu>
                <MenuItem Header="Shading">
                    <MenuItem x:Name="miWireframe" Header="Wireframe" Click="Wireframe_Click" IsChecked="True"/>
                    <MenuItem x:Name="miWireframeOnShaded" Header="Wireframe on shaded" Click="WireframeOnShaded_Click"/>
                    <MenuItem x:Name="miShaded" Header="Shaded" Click="Shaded_Click"/>
                </MenuItem>
                <MenuItem Header="Window">
                    <MenuItem Header="Detach a copy" Click="DetachACopy_Click"/>
                </MenuItem>
            </Menu>

            <StackPanel Orientation="Horizontal" Grid.Row="1" Background="#FF151515">
                <RadioButton x:Name="rbWireframe" Style="{StaticResource RadioButton.Image}" GroupName="RenderingStyle" Click="Wireframe_Click" IsChecked="True">
                    <Image Source="..\..\..\images\viewport\wireframe.png" ToolTip="Switch to the wireframe mode" Width="32" Height="32"/>
                </RadioButton>
                <RadioButton x:Name="rbWireframeOnShaded" Style="{StaticResource RadioButton.Image}" GroupName="RenderingStyle" Click="WireframeOnShaded_Click">
                    <Image Source="..\..\..\images\viewport\WireframeOnShaded.png" ToolTip="Switch to the wireframe on shaded mode" Width="32" Height="32"/>
                </RadioButton>
                <RadioButton x:Name="rbShaded" Style="{StaticResource RadioButton.Image}" GroupName="RenderingStyle" Click="Shaded_Click">
                    <Image Source="..\..\..\images\viewport\Shaded.png" ToolTip="View the scene in shaded mode" Width="32" Height="32"/>
                </RadioButton>
                <ToggleButton Style="{StaticResource ToggleButton.Image}" Click="ShowLight_Click">
                    <Image Source="..\..\..\images\viewport\WithLight.png" ToolTip="Add light to the scene" Width="32" Height="32"/>
                </ToggleButton>
                <ToggleButton Style="{StaticResource ToggleButton.Image}"  Click="ShowTexture_Click">
                    <Image Source="..\..\..\images\viewport\WithTexture.png" ToolTip="Show/Hide textures" Width="32" Height="32"/>
                </ToggleButton>
                <ToggleButton Style="{StaticResource ToggleButton.Image}" Click="ShowNormal_Click">
                    <Image Source="..\..\..\images\viewport\Normal.png" ToolTip="Show/Hide normals" Width="32" Height="32"/>
                </ToggleButton>
            </StackPanel>

            <ogl:OGLImage x:Name="oglImage" Grid.Row="2"/>

        </Grid>
    </Border>
</UserControl>
